#include "CarDecoratorAutoMove.h"
#include <QDebug>

#include "UI/ModRun/Output/FactoryOutput.h"

CarDecoratorAutoMove::CarDecoratorAutoMove(std::shared_ptr<InterFaceCar> pCar) : CarDecorator(pCar)
{
    
}

CarDecoratorAutoMove::~CarDecoratorAutoMove()
{

}

//移动;
void CarDecoratorAutoMove::Move()
{
    CarDecorator::Move();
    AutoMove();
}

//自动驾驶;
void CarDecoratorAutoMove::AutoMove()
{
    QString strOutput = "Car::AutoMove:自动驾驶";
    qDebug() << strOutput;
    std::shared_ptr<IOutput> pOutPut = FactoryOutput::GetInstance()->CreateRunOutput();
    if (pOutPut)
    {
        std::initializer_list<QString> outList{ strOutput };
        pOutPut->OutPut(outList);
    }
}

